<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>团体认证</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/main.css">
    <link rel="stylesheet" href="../footBallAdmin/lib/layui/css/layui.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/requestUrl.js"></script>
    <style>
        .mask .popup ul li {
            margin: 0 auto;
        }

        .mask .popup p {
            color: #999;
            line-height: 22px;
            margin-top: 3%;
            border-bottom: 1px solid #ccc;
            padding-bottom: 2%
        }

        input[type=file] {
            display: inline-block;
        }

        .layui-upload-img {
            width: 160px;
            height: 90px;
            margin: 0 10px 10px 0;
        }

        .bank {
            position: fixed;
            width: 550px;
            height: 300px;
            background: #fff;
            border-radius: 8px;
            text-align: center;
            padding: 20px;
            z-index: 99;
            top: 32%;
            left: 50%;
            margin-left: -210px;
        }

        .bank .confirm_button {
            background: #169bd5;
            color: #fff;
            width: 150px;
            font-size: 16px;
            line-height: 40px;
            border-radius: 4px;
            text-align: center;
            margin-top: 60px;
            margin-left: auto;
            margin-right: auto;
            cursor: pointer;
        }

        html {
            height: 100% !important;
        }

        body {
            position: relative !important;
            min-height: 100% !important;
            box-sizing: border-box !important;
            padding-bottom: 257px !important;
            /* .footer 的高度，为 footer 占位 */
        }

        .footer {
            position: absolute !important;
            bottom: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 207px !important;
        }
    </style>
</head>

<body>
    <!-- 头部导航 -->
    <div class="head">
        <div style="background: #006633">
            <div class="container">
                <div style="line-height: 30px;color:#fff;position: absolute;font-size:12px;">山东省足球运动协会欢迎您！</div>
                <div class="do">
                    <div class="does1" style="display: block;">
                        <a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"><span>登录</span></a>
                        |
                        <a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/register.html"><span>注册</span></a>
                    </div>
                    <div class="does2" style="display:none">
                        <span>欢迎<span id="telphone" style="margin:0"></span></span>
                        |
                        <span><a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/personal.html"
                                id="nickname">个人中心</a></span>
                        |
                        <span class="logout" style="cursor: pointer;">退出</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="head-choose">
            <div class="container">
                <img src="http://newtest.sdfa.org.cn/webfile//public/headicon.png"
                    style="position: absolute;top: 15px;">
                <a href="http://newtest.sdfa.org.cn/">
                    <div class="headtext">
                        <div class="headtext1">山东省足球运动协会</div>
                        <div class="headtext2">SHANDONG FOOTBALL ASSOCIATION</div>
                    </div>
                </a>
                <div style="display:inline-block;margin-left:302px">
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/index.html?id=67">
                            <div>首页</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/notice.html?id=68">
                            <div>通知公告</div>
                        </a>
                        <div class="choosea-2">
                            <a href="http://newtest.sdfa.org.cn/notice.html?id=68&amp;item=1">
                                <div>公告规程</div>
                            </a>
                            <a href="http://newtest.sdfa.org.cn/notice.html?id=68&amp;item=2">
                                <div>政策法规</div>
                            </a>
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="javascript:void(0);">
                            <div>足球专区</div>
                        </a>
                        <div class="choosea-2">
                            <a href="http://newtest.sdfa.org.cn/soccernotice.html?id=70">
                                <div>女足专区</div>
                            </a>
                            <a href="http://newtest.sdfa.org.cn/prefecture.html?id=71&item=2&child=1">
                                <div>青少年足球</div>
                            </a>
                            <a href="http://newtest.sdfa.org.cn/soccernotice.html?id=72">
                                <div>社会足球</div>
                            </a>
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/video_list.html">
                            <div>视频教学</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/otherplace.html?id=87">
                            <div>各地足协</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/shopping/index.htm">
                            <div>商城</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/aboutus.html?id=77">
                            <div>关于我们</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                </div>
                <form action="result.html" method="post">
                    <div class="input-group">
                        <input type="text" name="word" value="" autocomplete="off" class="form-control"
                            placeholder="请输入您要搜索的内容">
                        <span class="glyphicon glyphicon-search" onclick="$('.head form').submit()"></span>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="center">
        <div class="person">
            <!-- <h2>个人资料</h2> -->
            <div class="data">
                <ul>
                    <li>
                        <span>请选择团体类型</span>
                        <div>
                            <label style="margin-right: 30px;font-weight: 400;">
                                <input style="margin-right: 8px;width: 14px;margin-top: 0;height: 14px;" class="jobType"
                                    type="radio" name="jobType" value="1">公司
                            </label>
                            <label style="margin-right: 30px;font-weight: 400;">
                                <input style="margin-right: 8px;width: 14px;margin-top: 0;height: 14px;" class="jobType"
                                    type="radio" name="jobType" value="2">工商局俱乐部
                            </label>
                            <label style="margin-right: 30px;font-weight: 400;">
                                <input style="margin-right: 8px;width: 14px;margin-top: 0;height: 14px;" class="jobType"
                                    type="radio" name="jobType" value="3">市级足协
                            </label>
                            <label style="margin-right: 30px;font-weight: 400;">
                                <input style="margin-right: 8px;width: 14px;margin-top: 0;height: 14px;" class="jobType"
                                    type="radio" name="jobType" value="6">区级足协
                            </label>
                            <label style="margin-right: 30px;font-weight: 400;">
                                <input style="margin-right: 8px;width: 14px;margin-top: 0;height: 14px;" class="jobType"
                                    type="radio" name="jobType" value="4">学校
                            </label>
                            <label style="margin-right: 30px;font-weight: 400;">
                                <input style="margin-right: 8px;width: 14px;margin-top: 0;height: 14px;" class="jobType"
                                    type="radio" name="jobType" value="5">民政局俱乐部
                            </label>
                        </div>
                    </li>
                    <div id="showDiv" style="display: none;">
                        <li>
                            <span>名称</span>
                            <input type="text" name="enterpriseName" class="enterpriseName" placeholder="请输入团体名称">
                        </li>
                        <li>
                            <span>住所</span>
                            <input type="text" name="enterpriseAddress" class="enterpriseAddress" placeholder="请输入团体地址">
                        </li>
                        <li>
                            <span>法定代表人</span>
                            <input type="text" name="legalRepresentative" class="legalRepresentative"
                                placeholder="请输入团体法定代表人">
                        </li>
                        <li>
                            <span>注册资金</span>
                            <input type="text" name="registeredFund" class="registeredFund" placeholder="请输入注册资金">
                            <span style="margin-left: 10px;">万元</span>
                        </li>
                        <li>
                            <span>统一社会信用代码</span>
                            <input type="text" name="" class="businessLicenseNo" placeholder="请输入统一社会信用代码">
                        </li>
                        <li>
                            <span>法人身份证号</span>
                            <input type="text" name="legalPersonIdCard " class="legalPersonIdCard "
                                placeholder="请输入法人身份证号">
                        </li>
                        <li style="height: auto;">
                            <span>法人身份证正面照片</span>
                            <div class="layui-upload">
                                <div class="layui-upload-list">
                                    <img src="img/image.jpg" class="layui-upload-img" id="demo3">
                                    <p id="demoText2"></p>
                                </div>
                                <button style="background: #169bd5;" type="button" class="layui-btn" id="test4">上传照片
                                </button>
                            </div>
                        </li>
                        <li style="height: auto;">
                            <span>法人身份证反面照片</span>
                            <div class="layui-upload">
                                <div class="layui-upload-list">
                                    <img src="img/image.jpg" class="layui-upload-img" id="demo2">
                                    <p id="demoText1"></p>
                                </div>
                                <button style="background: #169bd5;" type="button" class="layui-btn" id="test3">上传照片
                                </button>
                            </div>
                        </li>
                        <li>
                            <span>联系人</span>
                            <input type="text" name="linkman " class="linkman " placeholder="请输入联系人">
                        </li>
                        <li>
                            <span>固定电话</span>
                            <input type="text" name="fixationTel " class="fixationTel " placeholder="请输入固定电话">
                        </li>
                        <li>
                            <span>联系电话</span>
                            <input type="text" name="linkTel" class="linkTel" placeholder="请输入联系电话">
                        </li>
                        <div id="showDiv1">
                            <li>
                                <span>类型</span>
                                <select name="type" id="type">
                                    <option value="">请选择</option>
                                    <option value="个体户">个体户</option>
                                    <option value="个人独资企业">个人独资企业</option>
                                    <option value="合伙企业">合伙企业</option>
                                    <option value="有限公司">有限公司</option>
                                    <option value="股份公司">股份公司</option>
                                </select>
                            </li>
                            <li>
                                <span>成立时间</span>
                                <input type="text" name="establishmentData" id="establishmentData"
                                    class="establishmentData" placeholder="请输入成立时间">
                            </li>
                            <li>
                                <span>营业期限</span>
                                <input type="text" name="operatingPeriod" id="operatingPeriod" class="operatingPeriod"
                                    placeholder="请输入营业期限">
                            </li>
                            <li>
                                <span>经营范围</span>
                                <input type="text" name="businessScope" class="businessScope" placeholder="请输入经营范围">
                            </li>
                            <li>
                                <span>发证机关</span>
                                <input type="text" name="certificationAuthority" class="certificationAuthority"
                                    placeholder="请输入发证机关">
                            </li>
                            <li style="height: auto;">
                                <span>营业执照图片</span>
                                <div class="layui-upload">
                                    <div class="layui-upload-list">
                                        <img src="img/image.jpg" class="layui-upload-img" id="demo1">
                                        <p id="demoText"></p>
                                    </div>
                                    <button style="background: #169bd5;" type="button" class="layui-btn"
                                        id="test2">上传营业执照
                                    </button>
                                </div>
                            </li>
                        </div>
                        <div id="showDiv2">
                            <li>
                                <span>业务范围</span>
                                <input type="text" name="businessLine" id="businessLine" placeholder="请输入业务范围">
                            </li>
                            <li>
                                <span>活动区域</span>
                                <input type="text" name="movementArea" class="movementArea" placeholder="请输入活动区域">
                            </li>
                            <li>
                                <span>业务主管单位</span>
                                <input type="text" name="competentOrganization" class="competentOrganization"
                                    placeholder="请输入业务主管单位">
                            </li>
                            <li style="height: auto;">
                                <span>社会团体法人登记证书</span>
                                <div class="layui-upload">
                                    <div class="layui-upload-list">
                                        <img src="img/image.jpg" class="layui-upload-img" id="demo4">
                                        <p id="demoText3"></p>
                                    </div>
                                    <button style="background: #169bd5;" type="button" class="layui-btn" id="test5">上传照片
                                    </button>
                                </div>
                            </li>
                            <li>
                                <span>有效期</span>
                                <input type="text" name="validityDate" id="validityDate" class="validityDate"
                                    placeholder="请输入有效期">
                            </li>
                        </div>
                        <div style="cursor: pointer;display: block;margin: 0 auto;" class="save">提交</div>
                    </div>
                </ul>
            </div>
        </div>
    </div>
    <div class="mask">
        <div class="bank">
            <h3>线下打款信息</h3>
            <ul>
                <li style="margin-top: 45px;"><span
                        style="font-size: 18px;width: 110px;display: inline-block;text-align: left;">开户行账号：</span><input
                        class="bank-num" style="border: 1px solid #ccc;height: 35px;width:64%;padding-left: 1%;"
                        type="text" readonly="readonly" /></li>
                <li style="margin-top: 20px;"><span
                        style="font-size: 18px;width: 110px;display: inline-block;text-align: left;">开户行信息：</span><input
                        class="bank-info" style="border: 1px solid #ccc;height: 35px;width:64%;padding-left: 1%;"
                        type="text" readonly="readonly" /></li>
            </ul>
            <div class="confirm_button">
                确定
            </div>
        </div>


    </div>
    <!-- 底部 -->
    <div class="footer" style="min-width: 100%;margin-top: 50px;">
        <div>
            版权所有 山东省足球运动协会官方网站
        </div>
        <div>
            ICP经营许可证：鲁ICP备15020327号
        </div>
        <div>
            技术支持：山东乐体网络科技有限公司
        </div>
    </div>
    <script src="js/layer/layer.js"></script>
    <script src="../footBallAdmin/lib/layui/layui.js"></script>
    <script src="js/requestUrl.js"></script>
    <script>
        // 全局缓存global_nickName
        var global_nickName = sessionStorage.nickName;
        var global_userId = sessionStorage.userId;
        if (global_userId) {
            $('.do .does1').css('display', 'none')
            $('.do .does2').css('display', 'block')
        } else if (global_nickName == undefined || global_nickName == "") {
            $('.do .does1').css('display', 'block')
            $('.do .does2').css('display', 'none')
        }
        var global_tel = sessionStorage.tel;
        $("#telphone").text(global_tel)
        //退出
        $('.logout').click(function () {
            myAjax('/user/logout', {},
                function (data) {
                    console.log(data)
                    if (data.msg == 0) {
                        sessionStorage.clear()
                        window.location.href = "http://newtest.sdfa.org.cn/index.html"
                    }
                },
                function (err) {
                    console.log(err)
                })
        });
        $(".confirm_button").click(function () {
            $('.mask').fadeOut()
            window.location.href = "http://newtest.sdfa.org.cn/footballAssociation/zuxie/personal.html"
        })

        $("input[name='jobType']").on("click", function () {
            if ($(this).val() == 1 || $(this).val() == 2) {
                $("#showDiv").css("display", "block")
                $("#showDiv1").css("display", "block")
                $("#showDiv2").css("display", "none")
            } else if ($(this).val() == 3 || $(this).val() == 4 || $(this).val() == 5 || $(this).val() == 6) {
                $("#showDiv").css("display", "block")
                $("#showDiv2").css("display", "block")
                $("#showDiv1").css("display", "none")

            }

        })
        var requestUrl = getRequestPrefix();
        var userId = global_userId;
        layui.use(['upload', 'laydate'], function () {
            var $ = layui.jquery,
                upload = layui.upload,
                laydate = layui.laydate;
            //日期范围选择
            laydate.render({
                elem: '#validityDate',
                format: 'yyyy年MM月dd日', //可任意组合
                range: "~" //或 range: '~' 来自定义分割字符
            });
            //日期范围选择
            laydate.render({
                elem: '#establishmentData',
                format: 'yyyy年MM月dd日', //可任意组合
            });
            //日期范围选择
            laydate.render({
                elem: '#operatingPeriod',
                format: 'yyyy年MM月dd日', //可任意组合
                range: "~" //或 range: '~' 来自定义分割字符
            });
            //上传营业执照
            var uploadInst = upload.render({
                elem: '#test2',
                field: "paths",
                url: requestUrl + '/user/uploadImgs',
                done: function (res) {
                    $("#demo1").attr("src", res.url)
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                },
                error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText');
                    demoText.html(
                        '<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'
                    );
                    demoText.find('.demo-reload').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });
            //法人身份证反面照片
            var uploadInst1 = upload.render({
                elem: '#test3',
                field: "paths",
                url: requestUrl + '/user/uploadImgs',
                done: function (res) {
                    $("#demo2").attr("src", res.url)
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                },
                error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText1');
                    demoText.html(
                        '<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload1">重试</a>'
                    );
                    demoText.find('.demo-reload1').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });
            //法人身份证正面照片
            var uploadInst2 = upload.render({
                elem: '#test4',
                field: "paths",
                url: requestUrl + '/user/uploadImgs',
                done: function (res) {
                    $("#demo3").attr("src", res.url)
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                },
                error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText2');
                    demoText.html(
                        '<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload2">重试</a>'
                    );
                    demoText.find('.demo-reload2').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });
            //法人身份证正面照片
            var uploadInst3 = upload.render({
                elem: '#test5',
                field: "paths",
                url: requestUrl + '/user/uploadImgs',
                done: function (res) {
                    $("#demo4").attr("src", res.url)
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                },
                error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText3');
                    demoText.html(
                        '<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload3">重试</a>'
                    );
                    demoText.find('.demo-reload3').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });
        })

        // 点击提交信息
        $('.save').click(function (event) {
            var jobType = $("input[name='jobType']:checked").val() //团体分类
            var zuxieType
            var enterpriseName = $(".enterpriseName").val() //名称
            var enterpriseAddress = $(".enterpriseAddress").val() //住所
            var legalRepresentative = $(".legalRepresentative").val() //法定代表人
            var registeredFund = $(".registeredFund").val() //注册资金
            var businessLicenseNo = $(".businessLicenseNo").val() //统一社会信用代码
            var legalPersonIdCard = $(".legalPersonIdCard").val() //法人身份证号
            var idCardFrontUrl = $("#demo3").attr("src") //法人身份证正面照片
            var idCardReverseUrl = $("#demo2").attr("src") //法人身份证反面照片
            var linkman = $(".linkman").val() //联系人
            var fixationTel = $(".fixationTel").val() //固定电话
            var linkTel = $(".linkTel").val() //联系电话
            if (jobType == "" || jobType == undefined) {
                layer.msg("请选择团体分类")
                return false
            } else if (enterpriseName == "") {
                layer.msg("请输入名称")
                return false
            } else if (enterpriseAddress == "") {
                layer.msg("请输入住所")
                return false
            } else if (legalRepresentative == "") {
                layer.msg("请输入法定代表人")
                return false
            } else if (registeredFund == "") {
                layer.msg("请输入注册资金")
                return false
            } else if (businessLicenseNo == "") {
                layer.msg("请输入统一社会信用代码")
                return false
            } else if (legalPersonIdCard == "") {
                layer.msg("请输入法人身份证号")
                return false
            } else if (idCardFrontUrl == "img/image.jpg") {
                layer.msg("请上传法人身份证正面照片")
                return false
            } else if (idCardReverseUrl == "img/image.jpg") {
                layer.msg("请上传法人身份证反面照片")
                return false
            } else if (linkman == "") {
                layer.msg("请输入联系人")
                return false
            } else if (fixationTel == "") {
                layer.msg("请输入固定电话")
                return false
            } else if (linkTel == "") {
                layer.msg("请输入联系电话")
                return false
            }
            //type1
            var type = $("#type").val() //类型
            var establishmentData = $(".establishmentData").val() //成立时间
            var operatingPeriod = $("#operatingPeriod").val() //营业期限
            var businessScope = $(".businessScope").val() //经营范围
            var certificationAuthority = $(".certificationAuthority").val() //发证机关
            var businessLicenseImg = $("#demo1").attr("src") //营业执照
            //type2
            var businessLine = $(".certificationAuthority").val() //业务范围
            var movementArea = $(".movementArea").val() //活动区域
            var competentOrganization = $(".competentOrganization").val() //业务主管单位
            var organizationinCorporationCertificateUrl = $("#demo4").attr("src") //社会团体法人登记证书
            var validityDate = $(".validityDate").val() //有效期


            if (jobType == 1) {
                if (type == "") {
                    layer.msg("请选择类型")
                    return false
                } else if (establishmentData == "") {
                    layer.msg("请输入成立时间")
                    return false
                } else if (operatingPeriod == "") {
                    layer.msg("请输入经营期限")
                    return false
                } else if (businessScope == "") {
                    layer.msg("请输入经营范围")
                    return false
                } else if (certificationAuthority == "") {
                    layer.msg("请输入发证机关")
                    return false
                } else if (businessLicenseImg == "img/image.jpg") {
                    layer.msg("请输入营业执照")
                    return false
                }
                myAjax('/user/perfectUserInfo', {
                        groupType: 3,
                        jobType: "",
                        enterpriseName: enterpriseName, //名称
                        enterpriseAddress: enterpriseAddress, //住所
                        legalRepresentative: legalRepresentative, //法定代表人
                        registeredFund: registeredFund, //注册资金
                        businessLicenseNo: businessLicenseNo, //统一社会信用代码
                        legalPersonIdCard: legalPersonIdCard, //法人身份证号
                        idCardFrontUrl: idCardFrontUrl, //法人身份证正面照片
                        idCardReverseUrl: idCardReverseUrl, //法人身份证反面照片
                        linkman: linkman, //联系人
                        fixationTel: fixationTel, //固定电话
                        linkTel: linkTel, //联系电话
                        type: type, //类型
                        establishmentData: establishmentData, //成立时间
                        operatingPeriod: operatingPeriod, //营业期限
                        businessScope: businessScope, //经营范围
                        certificationAuthority: certificationAuthority, //发证机关
                        businessLicenseImg: businessLicenseImg, //营业执照
                        businessLine: "", //业务范围
                        movementArea: "", //活动区域
                        competentOrganization: "", //业务主管单位
                        organizationinCorporationCertificateUrl: "", //社会团体法人登记证书
                        validityDate: "" //有效期
                    },

                    function (data) {
                        console.log(data)
                        if (data.msg == "0") {
                            /* sessionStorage.nickName = data.nickName*/
                            $(".bank-num").val(data.openingBank.receivingAccount)
                            $(".bank-info").val(data.openingBank.bankName + data.openingBank.openingBank)
                            $('.mask').fadeIn(300)
                        } else if (data.msg == "2") {
                            layer.alert("您当前暂未登录，请登录后在操作", {
                                title: "提示",
                                cancel: function () {
                                    window.location.href =
                                        "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                                }
                            }, function () {
                                window.location.href =
                                    "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                            });

                        } else {
                            layer.alert(data.msg, {
                                title: '提示'
                            })
                        }
                    },
                    function (err) {
                        console.log(err)
                    })
            } else if (jobType == 2) {
                if (type == "") {
                    layer.msg("请输入类型")
                    return false
                } else if (establishmentData == "") {
                    layer.msg("请输入成立时间")
                    return false
                } else if (operatingPeriod == "") {
                    layer.msg("请输入营业期限")
                    return false
                } else if (businessScope == "") {
                    layer.msg("请输入经营范围")
                    return false
                } else if (certificationAuthority == "") {
                    layer.msg("请输入发证机关")
                    return false
                } else if (businessLicenseImg == "img/image.jpg") {
                    layer.msg("请输入营业执照")
                    return false
                }
                myAjax('/user/perfectUserInfo', {
                        groupType: 2,
                        jobType: 1,
                        enterpriseName: enterpriseName, //名称
                        enterpriseAddress: enterpriseAddress, //住所
                        legalRepresentative: legalRepresentative, //法定代表人
                        registeredFund: registeredFund, //注册资金
                        businessLicenseNo: businessLicenseNo, //统一社会信用代码
                        legalPersonIdCard: legalPersonIdCard, //法人身份证号
                        idCardFrontUrl: idCardFrontUrl, //法人身份证正面照片
                        idCardReverseUrl: idCardReverseUrl, //法人身份证反面照片
                        linkman: linkman, //联系人
                        fixationTel: fixationTel, //固定电话
                        linkTel: linkTel, //联系电话
                        type: type, //类型
                        establishmentData: establishmentData, //成立时间
                        operatingPeriod: operatingPeriod, //营业期限
                        businessScope: businessScope, //经营范围
                        certificationAuthority: certificationAuthority, //发证机关
                        businessLicenseImg: businessLicenseImg, //营业执照
                        businessLine: "", //业务范围
                        movementArea: "", //活动区域
                        competentOrganization: "", //业务主管单位
                        organizationinCorporationCertificateUrl: "", //社会团体法人登记证书
                        validityDate: "" //有效期
                    },
                    function (data) {
                        console.log(data)
                        if (data.msg == "0") {
                            /* sessionStorage.nickName = data.nickName*/
                            $(".bank-num").val(data.openingBank.receivingAccount)
                            $(".bank-info").val(data.openingBank.bankName + data.openingBank.openingBank)
                            $('.mask').fadeIn(300)
                        } else if (data.msg == "2") {
                            layer.alert("您当前暂未登录，请登录后在操作", {
                                title: "提示",
                                cancel: function () {
                                    window.location.href =
                                        "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                                }
                            }, function () {
                                window.location.href =
                                    "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                            });


                        } else {
                            layer.alert(data.msg, {
                                title: '提示'
                            })
                        }
                    },
                    function (err) {
                        console.log(err)
                    })
            } else if (jobType == 3 || jobType == 4 || jobType == 6) {
                if (jobType == 3) {
                    jobType = 6;
                    zuxieType = 1
                } else if (jobType == 6) {
                    zuxieType = 2
                } else {
                    jobType = 4
                }
                var businessLine = $("#businessLine").val() //业务范围
                var movementArea = $(".movementArea").val() //活动区域
                var competentOrganization = $(".competentOrganization").val() //业务主管单位
                var organizationinCorporationCertificateUrl = $("#demo4").attr("src") //社会团体法人登记证书
                var validityDate = $(".validityDate").val() //有效期
                if (businessLine == "") {
                    layer.msg("请输入业务范围")
                    return false
                } else if (movementArea == "") {
                    layer.msg("请输入活动区域")
                    return false
                } else if (competentOrganization == "") {
                    layer.msg("请输入业务主管单位")
                    return false
                } else if (organizationinCorporationCertificateUrl == "img/image.jpg") {
                    layer.msg("请输入社会团体法人登记证书")
                    return false
                } else if (validityDate == "") {
                    layer.msg("请输入有效期")
                    return false
                }
                myAjax('/user/perfectUserInfo', {
                        groupType: jobType,
                        jobType: "",
                        zuxieType: zuxieType,
                        enterpriseName: enterpriseName, //名称
                        enterpriseAddress: enterpriseAddress, //住所
                        legalRepresentative: legalRepresentative, //法定代表人
                        registeredFund: registeredFund, //注册资金
                        businessLicenseNo: businessLicenseNo, //统一社会信用代码
                        legalPersonIdCard: legalPersonIdCard, //法人身份证号
                        idCardFrontUrl: idCardFrontUrl, //法人身份证正面照片
                        idCardReverseUrl: idCardReverseUrl, //法人身份证反面照片
                        linkman: linkman, //联系人
                        fixationTel: fixationTel, //固定电话
                        linkTel: linkTel, //联系电话
                        type: "", //类型
                        establishmentData: "", //成立时间
                        operatingPeriod: "", //营业期限
                        businessScope: "", //经营范围
                        certificationAuthority: "", //发证机关
                        businessLicenseImg: "", //营业执照
                        businessLine: businessLine, //业务范围
                        movementArea: movementArea, //活动区域
                        competentOrganization: competentOrganization, //业务主管单位
                        organizationinCorporationCertificateUrl: organizationinCorporationCertificateUrl, //社会团体法人登记证书
                        validityDate: validityDate //有效期
                    },
                    function (data) {
                        console.log(data)
                        if (data.msg == "0") {
                            /* sessionStorage.nickName = data.nickName*/
                            $(".bank-num").val(data.openingBank.receivingAccount)
                            $(".bank-info").val(data.openingBank.bankName + data.openingBank.openingBank)
                            $('.mask').fadeIn(300)
                        } else if (data.msg == "2") {
                            layer.alert("您当前暂未登录，请登录后在操作", {
                                title: "提示",
                                cancel: function () {
                                    window.location.href =
                                        "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                                }
                            }, function () {
                                window.location.href =
                                    "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                            });


                        } else {
                            layer.alert(data.msg, {
                                title: '提示'
                            })
                        }
                    },
                    function (err) {
                        console.log(err)
                    })

            } else if (jobType == 5) {
                var businessLine = $("#businessLine").val() //业务范围
                var movementArea = $(".movementArea").val() //活动区域
                var competentOrganization = $(".competentOrganization").val() //业务主管单位
                var organizationinCorporationCertificateUrl = $("#demo4").attr("src") //社会团体法人登记证书
                var validityDate = $(".validityDate").val() //有效期
                if (businessLine == "") {
                    layer.msg("请输入业务范围")
                    return false
                } else if (movementArea == "") {
                    layer.msg("请输入活动区域")
                    return false
                } else if (competentOrganization == "") {
                    layer.msg("请输入业务主管单位")
                    return false
                } else if (organizationinCorporationCertificateUrl == "img/image.jpg") {
                    layer.msg("请输入社会团体法人登记证书")
                    return false
                } else if (validityDate == "") {
                    layer.msg("请输入有效期")
                    return false
                }
                myAjax('/user/perfectUserInfo', {
                        groupType: 2,
                        jobType: 2,
                        enterpriseName: enterpriseName, //名称
                        enterpriseAddress: enterpriseAddress, //住所
                        legalRepresentative: legalRepresentative, //法定代表人
                        registeredFund: registeredFund, //注册资金
                        businessLicenseNo: businessLicenseNo, //统一社会信用代码
                        legalPersonIdCard: legalPersonIdCard, //法人身份证号
                        idCardFrontUrl: idCardFrontUrl, //法人身份证正面照片
                        idCardReverseUrl: idCardReverseUrl, //法人身份证反面照片
                        linkman: linkman, //联系人
                        fixationTel: fixationTel, //固定电话
                        linkTel: linkTel, //联系电话
                        type: "", //类型
                        establishmentData: "", //成立时间
                        operatingPeriod: "", //营业期限
                        businessScope: "", //经营范围
                        certificationAuthority: "", //发证机关
                        businessLicenseImg: "", //营业执照
                        businessLine: businessLine, //业务范围
                        movementArea: movementArea, //活动区域
                        competentOrganization: competentOrganization, //业务主管单位
                        organizationinCorporationCertificateUrl: organizationinCorporationCertificateUrl, //社会团体法人登记证书
                        validityDate: validityDate //有效期
                    },
                    function (data) {
                        console.log(data)
                        if (data.msg == "0") {
                            /* sessionStorage.nickName = data.nickName*/
                            $(".bank-num").val(data.openingBank.receivingAccount)
                            $(".bank-info").val(data.openingBank.bankName + data.openingBank.openingBank)
                            $('.mask').fadeIn(300)
                        } else if (data.msg == "2") {
                            layer.alert("您当前暂未登录，请登录后在操作", {
                                title: "提示",
                                cancel: function () {
                                    window.location.href =
                                        "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                                }
                            }, function () {
                                window.location.href =
                                    "http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"
                            });


                        } else {
                            layer.alert(data.msg, {
                                title: '提示'
                            })
                        }
                    },
                    function (err) {
                        console.log(err)
                    })

            }


        });
    </script>
</body>

</html>